How To Get The Last Character of a String in JavaScript